import createVanilla from 'zustand/vanilla'
import create from 'zustand'
import { ShareState } from './interface'
/*
export interface ShareState {
	open: boolean
	meetingInfo: MeetingEntity
	type?: 'virtual' | 'meeting'
	update: (d: Partial<Omit<ShareState, 'update'>>) => void
}
*/
export const store = createVanilla<ShareState>((set) => ({
	open: false,
	meetingInfo: { name: '', duration: 0, startTime: '', e164: '', meetingMoid: '' },
	type: 'virtual',
	update: (d) => set({ ...d }),
	hide: (open: boolean) => set({ open }),
}))
export const useStore = create(store)
